package com.xunji.xunji.module.trace.dao;


import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.stmt.query.In;
import com.j256.ormlite.table.DatabaseTable;
import com.xunji.xunji.module.trace.en.TraceTypeEnum;

import java.util.Date;

/**
 * Created by Paul on 2017/2/10.
 */

//用注解标示该类和表user来映射，如果不写tableName则会默认用该类的类名来当做表名。
@DatabaseTable(tableName = "t_trace")
public class Trace {

    //用注解标示字段和表中的字段来对应，id=true表示该字段为主键。
    @DatabaseField(generatedId = true)
    private Long id;
    @DatabaseField
    private Integer traceId;
    @DatabaseField
    private double longitude;
    @DatabaseField
    private double latitude;
    @DatabaseField
    private double altitude;
    @DatabaseField
    private Date date;
    @DatabaseField
    private int type = TraceTypeEnum.NORMAL_POINT.getType();


    public Trace() {

    }

    public Trace(double longitude, double latitude, Date date, int type) {
        this.longitude = longitude;
        this.latitude = latitude;
        this.date = date;
        this.type = type;
    }

    public Trace(Long id, double longitude, double latitude, Date date, int type) {
        this.id = id;
        this.longitude = longitude;
        this.latitude = latitude;
        this.date = date;
        this.type = type;
    }

    public Integer getTraceId() {
        return traceId;
    }

    public void setTraceId(Integer traceId) {
        this.traceId = traceId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public double getAltitude() {
        return altitude;
    }

    public void setAltitude(double altitude) {
        this.altitude = altitude;
    }
}
